package com.charging.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @author 冯政尚
 * @data 2019/9/26 17:05
 */
public class a {

    public  static  void main(String ar[]) throws ParseException {
        SimpleDateFormat timeFormater=  new SimpleDateFormat("YYYY-MM-DD hh:mm:ss");
        System.out.println(timeFormater);
        String date=timeFormater.format(new Date());
        System.out.println(date);
        Date dateStr=timeFormater.parse(date);
        System.out.println(dateStr);
        System.err.println(date);
        System.err.println(timeFormater.format(dateStr));

    }


}
